<template>
    <div>
        <div v-if="imgtype == 'left'" style="float: left;">
            <div style="margin: 20rpx; width:160rpx;height:160rpx;_background-color: #ccc;">
                <image :src="imgurl" style="width:100%;height: 100%;border-radius: 10rpx;" mode="aspectFill"></image>
            </div>
        </div>
        <div v-if="imgtype == 'right'" style="float: right;">
            <div style="margin: 20rpx; width:160rpx;height:160rpx;_background-color: #ccc;">
                <image :src="imgurl" style="width:100%;height: 100%;border-radius: 10rpx;" mode="aspectFill"></image>
            </div>
        </div>
        <div style="width:100%;"
            :style="{ marginLeft: imgtype == 'left' ? '200rpx' : '', marginRight: imgtype == 'right' ? '200rpx' : '' }">
            <slot></slot>
        </div>
        <div style="clear: both;"></div>
    </div>
</template>

<script>
export default {
    props: ['imgtype', 'imgurl']
}
</script>

<style scoped></style>